import mockRequest from '@/utils/mockRequest.js'
 
export default {
    namespaced:true, //开启命名空间
    actions:{
         //发送请求获取mock的数据
     async  getChartData(context,vlaue){
         let result =  await  mockRequest.get('/mock/home/list')
          if(result.code == 20000){
               context.commit('GETCGARTDATA',result.data)
          }
        }
    },
    mutations:{
        GETCGARTDATA(state,value){
            state.chartDataList = value
        }
    },
    state:{
        sum:888,//当前的和
        name:'小陌科技',
        chartDataList:{}
    },
    getters:{
        
    }
}

